import { bindData, ifPosition } from "../Data/dataBase";

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.Label)
    posLabel:cc.Label = null;

    onLoad(){
        bindData("PLAYER_DATA", "POSITION", function(pos:ifPosition){
            this.posLabel.string = pos.x.toFixed(0) + "," + pos.y.toFixed(0);
        }.bind(this), this);
    }
}
